home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / c / dice-3.16.lha / examples / Shared_Lib / init.c < prev    next >
C/C++ Source or Header  |  1998-09-27  |  412b  |  33 lines

  1.  
  2. /*
  3.  *  INIT.C
  4.  */
  5.  
  6. #include "defs.h"
  7.  
  8. Prototype void InitC(void);
  9. Prototype void UnInitC(void);
  10.  
  11. Prototype SignalSemaphore SemLock;
  12. Prototype List          StrList;
  13.  
  14. SignalSemaphore SemLock;
  15. List        StrList;
  16.  
  17. void
  18. InitC(void)
  19. {
  20.     NewList(&StrList);
  21.     InitSemaphore(&SemLock);
  22. }
  23.  
  24. void
  25. UnInitC(void)
  26. {
  27.     Node *node;
  28.  
  29.     while (node = RemHead(&StrList))
  30.     FreeMem(node, sizeof(Node) + strlen(node->ln_Name) + 1);
  31. }
  32.  
  33.